package airlinesystem;

import java.util.HashSet;
import java.util.Set;

/**
 * Represents the role of being an employee of an airline
 * @author Robert Maaskant & Dennis van der Zwet
 *
 */
public class EmployeeRole extends PersonRole
{
  /**
   * The supervisor of this employee
   */
  private EmployeeRole supervisor;
  /**
   * The function this employee is employed as
   */
  private String jobFunction;
  /**
   * The flights this employee works on
   */
  private Set<SpecificFlight> flights;
  
  /**
   * Constructor for EmployeeRole
   * @param person the person this role is associated with 
   * @param supervisor the supervisor of this employee
   */
  public EmployeeRole(Person person, EmployeeRole supervisor, String jobFunction)
  {
    super(person);
    this.supervisor = supervisor;
    this.jobFunction = jobFunction;
    flights = new HashSet<SpecificFlight>();
  }

  /**
   * Returns the supervisor of this employee
   * @return the supervisor of this employee
   */
  public EmployeeRole getSupervisor()
  {
    return supervisor;
  }

  /**
   * Returns the function this employee is employed as
   * @return the function this employee is employed as
   */
  public String getJobFunction()
  {
    return jobFunction;
  }
 
  /**
   * Returns the flights this employee works on
   * @return the flights this employee works on
   */
  public Set<SpecificFlight> getFlights()
  {
    return new HashSet<SpecificFlight>(flights);
  }
}
